﻿<?php
if($v_af_id > 0){
	$v_name = $rs_single_af['C_NAME'];
	$v_content = $rs_single_af['C_CONTENT'];
}?>
<table width="100%" cellpadding="0" cellspacing="0">
	<tr><td height="5"></td></tr>
	<tr>
		<td class="page_title" width="100%"><?php echo CONST_AF_MEANING_DISPLAY_LABEL; ?></td>
	</tr>	
	<tr>
		<td class="af_content_title" align="center"><?php echo $v_name; ?></td>
	</tr>
	<tr>
		<td class="af_content_label"><?php echo _restore_XML_bad_char($v_content);?></td>
	</tr>
	<!--Phan hien thi cac file dinh kem cua bai viet -->
	<?php
	if ($v_total_file > 0) {?> 
		<tr><td height="10"></td></tr>
		<tr>
			<td class="file_attach_list"><? echo CONST_AF_FILE_ATTACK_LIST_LABEL;?></td>
		</tr>
		<tr>
			<td colspan="2">
				<!--Bang chua cac file dinh kem-->
				<table width="90%" cellpadding="0" cellspacing="0" >
					<!--Vong lap hien thi cac file da dinh kem van ban--><?				
					for ($i = 0; $i < sizeof($rs_single_af_file); $i++) {
						$v_af_file_id =$rs_single_af_file[$i]['0'];
						$v_file_name = $rs_single_af_file[$i]['2']; 
						$v_file_url = trim(CONST_AF_URL_PATH_FROM_ROOT) .$v_file_name;
						$v_goto_url = "javascript:filename_onclick('T_ONEGATE_AF_FILE', 'PK_AF_FILE', 'C_FILE_NAME', 'C_FILE_CONTENT'," . strval($v_af_file_id) . ",'" . $v_file_url ."');" ;
						$target = "";?>
						<tr class="file_attach">
							<td>
								<li class="normal_li">
									<a href="<? echo $v_goto_url; ?>" class="file_attach" <? echo $target;?>><? echo $v_file_name;?></a>
								</li>
							</td>
						</tr><?
						}
					?>							
				</table>
			</td>
		</tr><?
	}	//Dong if 1
	?>
	<!--Phan hien thi cac TTHC lien quan -->
	<?php
	//$rs_single_af_file=0;
	if ($v_total_af_concern > 0) {  // IF 1 ?> 
		<tr><td height="10"></td></tr>
		<tr>
			<td class="file_attach_list"><? echo CONST_AF_CONCERN_LABEL;?></td>
		</tr>
		<tr>
			<td colspan="2">
				<!--Bang chua cac TTHC lien quan-->
				<table width="90%" cellpadding="0" cellspacing="0" >
					<?				
						for ($i = 0; $i < $v_total_af_concern; $i++) {
							$v_af_concern_id =$arr_af_concern[$i]['0'];
							$v_af_concern_name = $arr_af_concern[$i]['1'];							
							$v_goto_url =  "index.php?fuseaction=DISPLAY_SINGLE_AF&v_session=".$v_session."&af_id=" . $v_af_concern_id;
					?>
							<tr class="file_attach">
								<td>
									<li class="normal_li">
										<a href="<? echo $v_goto_url; ?>" class="file_attach"><? echo $v_af_concern_name;?></a>
									</li>
								</td>
							</tr><?
						}
					?>							
				</table>
			</td>
		</tr><?
	}	//Dong if 1
	?>

</table>
<table width="100%" cellpadding="0" cellspacing="0">
	<tr><td>&nbsp;</td></tr>
	<tr>
		<td align="center"><a class="normal_button" href="<?php echo $_URL_BACK?>"><?php echo _CONST_BACK_BUTTON; ?></a></td>
	</tr>
</table>

<script>
function show_article_mark_onclick(p_goto_url,p_fuseaction)
{ 	v_url = _DSP_MODAL_DIALOG_URL_PATH;
	v_url = v_url + "?goto_url=" + p_goto_url + "&fuseaction=" + p_fuseaction ;
	v_url = v_url + "&mark_id=" + document.forms(1).rad_mark.value;
	v_url = v_url + "&modal_dialog_mode=1" + "&" + randomizeNumber();
	sRtn = showModalDialog(v_url,"","dialogWidth=400pt;dialogHeight=280pt;dialogTop=80pt;status=no;scroll=no;");
	if (!sRtn) return;
}
</script>